# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2019/1/22 9:35
# @File     : __test.py
# @Software : PyCharm


class NJL(object):
    name = 'njl'
    age = 18

    def __init__(self):
        self.gender = 'male'

    def keys(self):
        return ('name', 'age' )

    def __getitem__(self, item):
        return getattr(self, item)

# print(NJL().__dict__)
# r = dict(nickname='NJL', age=18)
o = NJL()
# print(o['name'])
print(dict(o))
print(o.__class__.__name__)